<?php
require_once("../includes/Includes.php");
require_once("../includes/database.object.class.php");

class class_type extends Database_object
{
     protected static $table_name="class_type";
	 protected static $db_fields = array('ID','name');
     protected $ID;
	 protected $name;

   public function set_id($ID)
   {
     $this->ID = $ID;
   }
   public function get_id()
   {
     return $this->ID;
   }
   
   

  public function set_name($value)
  {
    $this->name = $value;
  }
  public function get_name()
  {
	  return $this->name;
  }

  
  public static function find_name($ID)
  {
    global $database;
    $sql = "SELECT name FROM ". self::$table_name ." WHERE ID=".$ID;
    $result = $database->doQuery($sql);
    $row = mysqli_fetch_array($result);
    return $row['name'];
  }  
}
?>